home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
WINPROGS
/
WINSRC20.ZIP
/
FRACTINT.H
< prev
next >
Wrap
Text File
|
1990-09-13
|
16KB
|
494 lines
/* FRACTINT.H - common structures and values for the FRACTINT routines */
#define MAXPIXELS 2049 /* Maximum pixel count across/down the screen */
#define SCREENASPECT 0.75 /* Assumed overall screen dimensions, y/x */
struct videoinfo { /* All we need to know about a Video Adapter */
char name[26]; /* Adapter name (IBM EGA, etc) */
char comment[26]; /* Comments (UNTESTED, etc) */
int videomodeax; /* begin with INT 10H, AX=(this) */
int videomodebx; /* ...and BX=(this) */
int videomodecx; /* ...and CX=(this) */
int videomodedx; /* ...and DX=(this) */
/* NOTE: IF AX==BX==CX==0, SEE BELOW */
int dotmode; /* video access method used by asm code */
/* 1 == BIOS 10H, AH=12,13 (SLOW) */
/* 2 == access like EGA/VGA */
/* 3 == access like MCGA */
/* 4 == Tseng-like SuperVGA*256 */
/* 5 == P'dise-like SuperVGA*256 */
/* 6 == Vega-like SuperVGA*256 */
/* 7 == "Tweaked" IBM-VGA ...*256 */
/* 8 == "Tweaked" SuperVGA ...*256 */
/* 9 == Targa Format */
/* 10 = Hercules */
/* 11 = "disk video" (no screen) */
/* 12 = 8514/A */
/* 13 = CGA 320x200x4, 640x200x2 */
/* 14 = Tandy 1000 */
/* 15 = TRIDENT SuperVGA*256 */
/* 16 = Chips&Tech SuperVGA*256 */
int xdots; /* number of dots across the screen */
int ydots; /* number of dots down the screen */
int colors; /* number of colors available */
};
/* NOTE: if videomode[abc]x == 0, 'setvideomode' assumes it has an IBM (or
register compatible) adapter and tweaks the registers directly
to get one of the following modes (based on the value of videomodedx):
1 704 x 528 x 16
2 720 x 540 x 16
3 736 x 552 x 16
4 752 x 564 x 16
5 768 x 576 x 16
6 784 x 588 x 16
7 800 x 600 x 16
8 360 x 480 x 16
*/
#define INFO_ID "Fractal"
#define FRACTAL_INFO struct fractal_info
struct fractal_info /* for saving data in GIF file */
{
char info_id[8]; /* Unique identifier for info block */
int iterations;
int fractal_type; /* 0=Mandelbrot 1=Julia 2= ... */
double xmin;
double xmax;
double ymin;
double ymax;
double creal;
double cimag;
int videomodeax;
int videomodebx;
int videomodecx;
int videomodedx;
int dotmode;
int xdots;
int ydots;
int colors;
int version; /* used to be 'future[0]' */
float parm3;
float parm4;
float potential[3];
int rseed;
int rflag;
int biomorph;
int inside;
int logmap;
float invert[3];
int decomp[2];
int symmetry;
/* version 2 stuff */
int init3d[16];
int previewfactor;
int xtrans;
int ytrans;
int red_crop_left;
int red_crop_right;
int blue_crop_left;
int blue_crop_right;
int red_bright;
int blue_bright;
int xadjust;
int eyeseparation;
int glassestype;
/* version 3 stuff, release 13 */
int outside;
/* version 4 stuff, release 14 */
double x3rd; /* 3rd corner */
double y3rd;
char stdcalcmode; /* 1/2/g/b */
char useinitorbit; /* init Mandelbrot orbit flag */
int calc_status; /* resumable, finished, etc */
long tot_extend_len; /* total length of extension blocks in .fra file */
int distest;
int floatflag;
int bailout;
long calctime;
unsigned char trigndx[4]; /* which trig functions selected */
int finattract;
double initorbit[2]; /* init Mandelbrot orbit values */
int periodicity; /* periodicity checking */
/* version 5 stuff, release 15 */
int pot16bit; /* save 16 bit continuous potential info */
float faspectratio; /* finalaspectratio, y/x */
int system; /* 0 for dos, 1 for windows */
int release; /* release number, with 2 decimals implied */
int future[22]; /* for stuff we haven't thought of yet */
};
#define MAXVIDEOMODES 100 /* maximum size of the video table */
#if defined(PUTTHEMHERE) /* this MUST be defined ONLY in FRACTINT.C */
struct videoinfo videoentry;
int maxvideomode; /* size of the above list */
char *fkeys[] = { /* Function Key names for display table */
/* "F1", Appropriated by the Help function */
"F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
"SF1","SF2","SF3","SF4","SF5","SF6","SF7","SF8","SF9","SF10",
"CF1","CF2","CF3","CF4","CF5","CF6","CF7","CF8","CF9","CF10",
"AF1","AF2","AF3","AF4","AF5","AF6","AF7","AF8","AF9","AF10",
"Alt-1","Alt-2","Alt-3","Alt-4","Alt-5",
"Alt-6","Alt-7","Alt-8","Alt-9","Alt-0",
"Alt-Q","Alt-W","Alt-E","Alt-R","Alt-T",
"Alt-Y","Alt-U","Alt-I","Alt-O","Alt-P",
"Alt-A","Alt-S","Alt-D","Alt-F","Alt-G",
"Alt-H","Alt-J","Alt-K","Alt-L",
"Alt-Z","Alt-X","Alt-C","Alt-V","Alt-B","Alt-N","Alt-M",
"Alt--","Alt-=",
"Ctl-A","Ctl-B", "Ctl-D","Ctl-E","Ctl-F","Ctl-G",
"Ctl-K","Ctl-L","Ctl-N","Ctl-O","Ctl-P", "Ctl-R",
"Ctl-T","Ctl-U","Ctl-V","Ctl-W","Ctl-X","Ctl-Y","Ctl-Z",
"F11","F12","SF11","SF12","CF11","CF12","AF11","AF12",
"Alt-,","Alt-.","Alt-/","Alt-;","Alt-'","Alt-[","Alt-]","Alt-\\",
"Alt-`","A-Tab","A-Bks","A-Esc",
"END"};
int kbdkeys[] = { /* Function Keystrokes for above names */
/* 1059, Appropriated by the Help function */
1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068,
1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093,
1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103,
1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113,
1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129,
1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025,
1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038,
1044, 1045, 1046, 1047, 1048, 1049, 1050,
1130, 1131,
1, 2, 4, 5, 6, 7,
11, 12, 14, 15, 16, 18,
20, 21, 22, 23, 24, 25, 26,
1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140,
1051, 1052, 1053, 1039, 1040, 1026, 1027, 1043,
1041, 1165, 1014, 1001,
0};
#else
extern struct videoinfo videoentry;
extern int maxvideomode;
#endif
#define NUMIFS 32 /* number of ifs functions in ifs array */
#define IFSPARM 7 /* number of ifs parameters */
#define IFS3DPARM 13 /* number of ifs 3D parameters */
/* defines for symmetry */
#define NOSYM 0
#define XAXIS_NOPARM -1
#define XAXIS 1
#define YAXIS_NOPARM -2
#define YAXIS 2
#define XYAXIS_NOPARM -3
#define XYAXIS 3
#define ORIGIN_NOPARM -4
#define ORIGIN 4
#define PI_SYM_NOPARM -5
#define PI_SYM 5
#define XAXIS_NOIMAG -6
#define XAXIS_NOREAL 6
#define NOPLOT 99
#define SETUP_SYM 100
/* bitmask defines for fractalspecific flags */
#define NOZOOM 1 /* zoombox not allowed at all */
#define NOGUESS 2 /* solid guessing not allowed */
#define NOTRACE 4 /* boundary tracing not allowed */
#define NOROTATE 8 /* zoombox rotate/stretch not allowed */
#define NORESUME 16 /* can't interrupt and resume */
#define INFCALC 32 /* this type calculates forever */
#define TRIG1 64 /* number of trig functions in formula*/
#define TRIG2 128
#define TRIG3 192
#define TRIG4 256
#define WINFRAC 512 /* supported in WinFrac */
#define AUTOINVERT -123456.789
extern float far initifs[NUMIFS][IFSPARM]; /* IFS code values */
extern float far initifs3d[NUMIFS][IFS3DPARM]; /* IFS 3D code values */
#define N_ATTR 8 /* max number of attractors */
struct fractalspecificstuff
{
char *name; /* name of the fractal */
char *param[4]; /* name of the parameters */
float paramvalue[4]; /* default parameter value */
int flags; /* constraints, bits defined above */
float xmin; /* default XMIN corner */
float xmax; /* default XMAX corner */
float ymin; /* default YMIN corner */
float ymax; /* default YMAX corner */
int isinteger; /* 1 if integerfractal, 0 otherwise */
int tojulia; /* mandel-to-julia switch */
int tomandel; /* julia-to-mandel switch */
int tofloat; /* integer-to-floating switch */
in